package com.deke.baby.service.impl;

import java.util.List;
import com.deke.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.deke.baby.mapper.SignFamilyMemberMapper;
import com.deke.baby.domain.SignFamilyMember;
import com.deke.baby.service.ISignFamilyMemberService;

/**
 * 活动报名家庭成员Service业务层处理
 *
 * @author deke
 * @date 2023-06-28
 */
@Service
public class SignFamilyMemberServiceImpl implements ISignFamilyMemberService
{
    @Autowired
    private SignFamilyMemberMapper signFamilyMemberMapper;

    /**
     * 查询活动报名家庭成员
     *
     * @param id 活动报名家庭成员主键
     * @return 活动报名家庭成员
     */
    @Override
    public SignFamilyMember selectSignFamilyMemberById(Long id)
    {
        return signFamilyMemberMapper.selectSignFamilyMemberById(id);
    }

    /**
     * 查询活动报名家庭成员列表
     *
     * @param signFamilyMember 活动报名家庭成员
     * @return 活动报名家庭成员
     */
    @Override
    public List<SignFamilyMember> selectSignFamilyMemberList(SignFamilyMember signFamilyMember)
    {
        return signFamilyMemberMapper.selectSignFamilyMemberList(signFamilyMember);
    }

    /**
     * 新增活动报名家庭成员
     *
     * @param signFamilyMember 活动报名家庭成员
     * @return 结果
     */
    @Override
    public int insertSignFamilyMember(SignFamilyMember signFamilyMember)
    {
        signFamilyMember.setCreateTime(DateUtils.getNowDate());
        return signFamilyMemberMapper.insertSignFamilyMember(signFamilyMember);
    }

    /**
     * 修改活动报名家庭成员
     *
     * @param signFamilyMember 活动报名家庭成员
     * @return 结果
     */
    @Override
    public int updateSignFamilyMember(SignFamilyMember signFamilyMember)
    {
        signFamilyMember.setUpdateTime(DateUtils.getNowDate());
        return signFamilyMemberMapper.updateSignFamilyMember(signFamilyMember);
    }

    /**
     * 批量删除活动报名家庭成员
     *
     * @param ids 需要删除的活动报名家庭成员主键
     * @return 结果
     */
    @Override
    public int deleteSignFamilyMemberByIds(Long[] ids)
    {
        return signFamilyMemberMapper.deleteSignFamilyMemberByIds(ids);
    }

    /**
     * 删除活动报名家庭成员信息
     *
     * @param id 活动报名家庭成员主键
     * @return 结果
     */
    @Override
    public int deleteSignFamilyMemberById(Long id)
    {
        return signFamilyMemberMapper.deleteSignFamilyMemberById(id);
    }
}
